$(function () {
			var order_id=localStorage.order_id;
			var type=localStorage.type;
			var token=localStorage.phone;
			var content='';
			var one='';
			var All='';
			$('.btn_comfirm').click(function () {
				content=$('.text-input').val();
				$('input[type=checkbox]').each(function () {
					if($(this).prop('checked')){
						one=$(this).parent().parent().parent().find('span').html();
						All+=one+',';
					}
				});
				All=All+content;
				if(All!=''){

					$.ajax({
					url:'https://newapp.icandrive.cn/api/updateorder.php',
					type:'post',
					dataType:'json',
					data:{order_id:order_id,type:type,token:token,reason:All},
					success: function (data) {
						console.log(data);
						if(data.status==200){
							layer.msg('取消成功');
							setInterval(function () {
								window.location.href='../order/oder.html';
							},2000)
						}
						else{

						}

					},
					error:function (){
						 layer.msg('系统繁忙',function(){
                                history.go(0)
                            },1000);
					}
				})
				$(this).unbind();
				}
			})
		})
